package com.wsoft.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * <p>
 * 定时任务日志表
 * </p>
 *
 * @author z001
 * @since 2024年10月23日 08:16:48
 */
@Getter
@Setter
@TableName("ts_job_log")
@Schema(name = "TsJobLogEntity", description = "定时任务日志表")
public class TsJobLogEntity extends BaseEntity {

    @Schema(description = "任务主键")
    @TableField("job_id")
    private Long jobId;

    @Schema(description = "编码")
    @TableField("code")
    private String code;

    @Schema(description = "名称")
    @TableField("name")
    private String name;

    @Schema(description = "描述")
    @TableField("description")
    private String description;

    @Schema(description = "类路径")
    @TableField("class_path")
    private String classPath;

    @Schema(description = "cron执行表达式")
    @TableField("cron")
    private String cron;

    @Schema(description = "参数")
    @TableField("params")
    private String params;

    @Schema(description = "结果(0:异常；1：成功)")
    @TableField("result")
    private Integer result;

    @Schema(description = "任务开始时间")
    @TableField("start_time")
    private LocalDateTime startTime;

    @Schema(description = "执行时长-毫秒")
    private Long executeTimeMillis;

    @Schema(description = "任务结束时间")
    @TableField("end_time")
    private LocalDateTime endTime;

    @Schema(description = "异常日志")
    @TableField("exception")
    private String exception;
}
